<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>窗口大小</title>
		<script>
			console.log(typeof(window));
			function showSize(){
				alert(window.innerHeight+"*"+window.innerWidth);
			}
			function gotoBaidu(){
				window.location="https://www.baidu.com";
				//location="";
			}
			function closeWin(){
				if(window.confirm("真的要关闭？"))
					window.close();
				else{
					alert("您放弃了关闭");
				}
			}
			function open30(){
				for(let i=1;i<=30;i++){
					window.open("https://www.baidu.com","baidu"+i,"height=200px,width=100px,left="+(10*i)+"px,top="+(20+10*i)+"px");
				}
			}
		</script>
	</head>
	<body>
		<input type="button" value="显示窗口大小" onclick="showSize()"/>
		<input type="button" value="去百度" ondblclick="gotoBaidu()"/>
	<input type="button" value="关闭窗口" onclick="closeWin()"/>
	<input type="button" value="打开30个窗口" onclick="open30()"/>
	</body>
</html>